package edu.avans.hartigehap.repository;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import edu.avans.hartigehap.domain.WebMenuItem;

public class WebMenuItemRepositoryImpl implements WebMenuItemRepositoryCustom {

	@PersistenceContext
	private EntityManager em;

	public List<WebMenuItem> findAllPizzas() {
		return em.createNamedQuery("MenuPizza.findPizzas", WebMenuItem.class).getResultList();
	}
	
	public List<WebMenuItem> findAllToppings() {
		return em.createNamedQuery("MenuTopping.findToppings", WebMenuItem.class).getResultList();
	}
	
}
